package com.hospital.hospitalpatientservice.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

    /**
     * 每次记得修改mapper自己的扫描包
     */
    @Configuration //spring.xml
    @MapperScan("com.hospital.hospitalworkservice.mapper")
    public class MyBatisPlusConfig {
    //datasource: dbcp c3p0,druid,Hikari,BoneCp
    @Bean //相当于再 spring.xml <bean class="com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor"><bean>
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        //设置拦截器分页的参数
        return paginationInterceptor;
    }



}
